/*
day111
2019.12.17
*/
#include<iostream>
using namespace std;

class Solution {
private:
	int a=6;
	
public:
	int guess(int num)
	{
		if(num==a) return 0;
		if(num<a)  return 1;
		return -1;
	}
	
    int guessNumber(int n) 
	{
        int l=1,r=n;
        int mid;
        while(l<=n)
        {
        	mid=l+(r-l)/2;
        	if(guess(mid)==0) return mid;
        	else if(guess(mid)==-1)
        	{
        		r=mid-1;
			}
			else
			{
				l=mid+1;
				
			}
		}
		return 0;
    }
};
int main()
{
	Solution s;
	cout<<s.guessNumber(10);
	return 0;
}
